package rad.framework.uml2.classdiagram.part;

import rad.framework.uml2.classdiagram.edit.parts.ActorEditPart;
import rad.framework.uml2.classdiagram.edit.parts.ActorNameEditPart;
import rad.framework.uml2.classdiagram.edit.parts.Association2EditPart;
import rad.framework.uml2.classdiagram.edit.parts.Association3EditPart;
import rad.framework.uml2.classdiagram.edit.parts.Association4EditPart;
import rad.framework.uml2.classdiagram.edit.parts.Association5EditPart;
import rad.framework.uml2.classdiagram.edit.parts.AssociationEditPart;
import rad.framework.uml2.classdiagram.edit.parts.AssociationName2EditPart;
import rad.framework.uml2.classdiagram.edit.parts.AssociationName3EditPart;
import rad.framework.uml2.classdiagram.edit.parts.AssociationName4EditPart;
import rad.framework.uml2.classdiagram.edit.parts.AssociationName5EditPart;
import rad.framework.uml2.classdiagram.edit.parts.AssociationName6EditPart;
import rad.framework.uml2.classdiagram.edit.parts.AssociationName7EditPart;
import rad.framework.uml2.classdiagram.edit.parts.AssociationName8EditPart;
import rad.framework.uml2.classdiagram.edit.parts.AssociationName9EditPart;
import rad.framework.uml2.classdiagram.edit.parts.AssociationNameEditPart;
import rad.framework.uml2.classdiagram.edit.parts.ClassEditPart;
import rad.framework.uml2.classdiagram.edit.parts.ClassNameEditPart;
import rad.framework.uml2.classdiagram.edit.parts.ClassPropertiesEditPart;
import rad.framework.uml2.classdiagram.edit.parts.DependencyEditPart;
import rad.framework.uml2.classdiagram.edit.parts.DependencyNameEditPart;
import rad.framework.uml2.classdiagram.edit.parts.EnumerationEditPart;
import rad.framework.uml2.classdiagram.edit.parts.EnumerationLiteralEditPart;
import rad.framework.uml2.classdiagram.edit.parts.EnumerationLiteralsEditPart;
import rad.framework.uml2.classdiagram.edit.parts.EnumerationNameEditPart;
import rad.framework.uml2.classdiagram.edit.parts.GeneralizationEditPart;
import rad.framework.uml2.classdiagram.edit.parts.InterfaceEditPart;
import rad.framework.uml2.classdiagram.edit.parts.InterfaceNameEditPart;
import rad.framework.uml2.classdiagram.edit.parts.InterfaceOperationsEditPart;
import rad.framework.uml2.classdiagram.edit.parts.OperationEditPart;
import rad.framework.uml2.classdiagram.edit.parts.PackageEditPart;
import rad.framework.uml2.classdiagram.edit.parts.PropertyEditPart;
import rad.framework.uml2.classdiagram.edit.parts.UseCaseEditPart;
import rad.framework.uml2.classdiagram.edit.parts.UseCaseNameEditPart;
import rad.framework.uml2.classdiagram.util.ModelUtil;

import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.uml2.uml.Actor;
import org.eclipse.uml2.uml.Association;
import org.eclipse.uml2.uml.Dependency;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.EnumerationLiteral;
import org.eclipse.uml2.uml.Generalization;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.Type;
import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.UseCase;

/**
 * This registry is used to determine which type of visual object should be
 * created for the corresponding Diagram, Node, ChildNode or Link represented 
 * by a domain model object.
 *
 * @generated
 */
public class UMLVisualIDRegistry {

	/**
	 * @generated
	 */
	private static final String DEBUG_KEY = UMLDiagramEditorPlugin
			.getInstance().getBundle().getSymbolicName()
			+ "/debug/visualID"; //$NON-NLS-1$

	/**
	 * @generated
	 */
	public static int getVisualID(View view) {
		if (view instanceof Diagram) {
			if (PackageEditPart.MODEL_ID.equals(view.getType())) {
				return PackageEditPart.VISUAL_ID;
			} else {
				return -1;
			}
		}
		return getVisualID(view.getType());
	}

	/**
	 * @generated
	 */
	public static String getModelID(View view) {
		View diagram = view.getDiagram();
		while (view != diagram) {
			EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
			if (annotation != null) {
				return (String) annotation.getDetails().get("modelID"); //$NON-NLS-1$
			}
			view = (View) view.eContainer();
		}
		return diagram != null ? diagram.getType() : null;
	}

	/**
	 * @generated
	 */
	public static int getVisualID(String type) {
		try {
			return Integer.parseInt(type);
		} catch (NumberFormatException e) {
			if (Boolean.TRUE.toString().equalsIgnoreCase(
					Platform.getDebugOption(DEBUG_KEY))) {
				UMLDiagramEditorPlugin.getInstance().logError(
						"Unable to parse view type as a visualID number: "
								+ type);
			}
		}
		return -1;
	}

	/**
	 * @generated
	 */
	public static String getType(int visualID) {
		return String.valueOf(visualID);
	}

	/**
	 * @generated
	 */
	public static int getDiagramVisualID(EObject domainElement) {
		if (domainElement == null) {
			return -1;
		}
		EClass domainElementMetaclass = domainElement.eClass();
		return getDiagramVisualID(domainElement, domainElementMetaclass);
	}

	/**
	 * @generated
	 */
	private static int getDiagramVisualID(EObject domainElement,
			EClass domainElementMetaclass) {
		if (UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(
				domainElementMetaclass)
				&& isDiagramPackage_79((org.eclipse.uml2.uml.Package) domainElement)) {
			return PackageEditPart.VISUAL_ID;
		}
		return getUnrecognizedDiagramID(domainElement);
	}

	/**
	 * @generated
	 */
	public static int getNodeVisualID(View containerView, EObject domainElement) {
		if (domainElement == null) {
			return -1;
		}
		EClass domainElementMetaclass = domainElement.eClass();
		return getNodeVisualID(containerView, domainElement,
				domainElementMetaclass, null);
	}

	/**
	 * @generated
	 */
	public static int getNodeVisualID(View containerView,
			EObject domainElement, EClass domainElementMetaclass,
			String semanticHint) {
		String containerModelID = getModelID(containerView);
		if (!PackageEditPart.MODEL_ID.equals(containerModelID)) {
			return -1;
		}
		int containerVisualID;
		if (PackageEditPart.MODEL_ID.equals(containerModelID)) {
			containerVisualID = getVisualID(containerView);
		} else {
			if (containerView instanceof Diagram) {
				containerVisualID = PackageEditPart.VISUAL_ID;
			} else {
				return -1;
			}
		}
		int nodeVisualID = semanticHint != null ? getVisualID(semanticHint)
				: -1;
		switch (containerVisualID) {
		case ClassEditPart.VISUAL_ID:
			if (ClassNameEditPart.VISUAL_ID == nodeVisualID) {
				return ClassNameEditPart.VISUAL_ID;
			}
			if (ClassPropertiesEditPart.VISUAL_ID == nodeVisualID) {
				return ClassPropertiesEditPart.VISUAL_ID;
			}
			return getUnrecognizedClass_1001ChildNodeID(domainElement,
					semanticHint);
		case EnumerationEditPart.VISUAL_ID:
			if (EnumerationNameEditPart.VISUAL_ID == nodeVisualID) {
				return EnumerationNameEditPart.VISUAL_ID;
			}
			if (EnumerationLiteralsEditPart.VISUAL_ID == nodeVisualID) {
				return EnumerationLiteralsEditPart.VISUAL_ID;
			}
			return getUnrecognizedEnumeration_1002ChildNodeID(domainElement,
					semanticHint);
		case InterfaceEditPart.VISUAL_ID:
			if (InterfaceNameEditPart.VISUAL_ID == nodeVisualID) {
				return InterfaceNameEditPart.VISUAL_ID;
			}
			if (InterfaceOperationsEditPart.VISUAL_ID == nodeVisualID) {
				return InterfaceOperationsEditPart.VISUAL_ID;
			}
			return getUnrecognizedInterface_1003ChildNodeID(domainElement,
					semanticHint);
		case ActorEditPart.VISUAL_ID:
			if (ActorNameEditPart.VISUAL_ID == nodeVisualID) {
				return ActorNameEditPart.VISUAL_ID;
			}
			return getUnrecognizedActor_1004ChildNodeID(domainElement,
					semanticHint);
		case UseCaseEditPart.VISUAL_ID:
			if (UseCaseNameEditPart.VISUAL_ID == nodeVisualID) {
				return UseCaseNameEditPart.VISUAL_ID;
			}
			return getUnrecognizedUseCase_1005ChildNodeID(domainElement,
					semanticHint);
		case PropertyEditPart.VISUAL_ID:
			return getUnrecognizedProperty_2001ChildNodeID(domainElement,
					semanticHint);
		case EnumerationLiteralEditPart.VISUAL_ID:
			return getUnrecognizedEnumerationLiteral_2002ChildNodeID(
					domainElement, semanticHint);
		case OperationEditPart.VISUAL_ID:
			return getUnrecognizedOperation_2003ChildNodeID(domainElement,
					semanticHint);
		case ClassPropertiesEditPart.VISUAL_ID:
			if ((semanticHint == null || PropertyEditPart.VISUAL_ID == nodeVisualID)
					&& UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(
							domainElementMetaclass)
					&& (domainElement == null || isNodeProperty_2001((Property) domainElement))) {
				return PropertyEditPart.VISUAL_ID;
			}
			return getUnrecognizedClassProperties_5001ChildNodeID(
					domainElement, semanticHint);
		case EnumerationLiteralsEditPart.VISUAL_ID:
			if ((semanticHint == null || EnumerationLiteralEditPart.VISUAL_ID == nodeVisualID)
					&& UMLPackage.eINSTANCE.getEnumerationLiteral()
							.isSuperTypeOf(domainElementMetaclass)
					&& (domainElement == null || isNodeEnumerationLiteral_2002((EnumerationLiteral) domainElement))) {
				return EnumerationLiteralEditPart.VISUAL_ID;
			}
			return getUnrecognizedEnumerationLiterals_5002ChildNodeID(
					domainElement, semanticHint);
		case InterfaceOperationsEditPart.VISUAL_ID:
			if ((semanticHint == null || OperationEditPart.VISUAL_ID == nodeVisualID)
					&& UMLPackage.eINSTANCE.getOperation().isSuperTypeOf(
							domainElementMetaclass)
					&& (domainElement == null || isNodeOperation_2003((Operation) domainElement))) {
				return OperationEditPart.VISUAL_ID;
			}
			return getUnrecognizedInterfaceOperations_5003ChildNodeID(
					domainElement, semanticHint);
		case PackageEditPart.VISUAL_ID:
			if ((semanticHint == null || ClassEditPart.VISUAL_ID == nodeVisualID)
					&& UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(
							domainElementMetaclass)
					&& (domainElement == null || isNodeClass_1001((org.eclipse.uml2.uml.Class) domainElement))) {
				return ClassEditPart.VISUAL_ID;
			}
			if ((semanticHint == null || EnumerationEditPart.VISUAL_ID == nodeVisualID)
					&& UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(
							domainElementMetaclass)
					&& (domainElement == null || isNodeEnumeration_1002((Enumeration) domainElement))) {
				return EnumerationEditPart.VISUAL_ID;
			}
			if ((semanticHint == null || InterfaceEditPart.VISUAL_ID == nodeVisualID)
					&& UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(
							domainElementMetaclass)
					&& (domainElement == null || isNodeInterface_1003((Interface) domainElement))) {
				return InterfaceEditPart.VISUAL_ID;
			}
			if ((semanticHint == null || ActorEditPart.VISUAL_ID == nodeVisualID)
					&& UMLPackage.eINSTANCE.getActor().isSuperTypeOf(
							domainElementMetaclass)
					&& (domainElement == null || isNodeActor_1004((Actor) domainElement))) {
				return ActorEditPart.VISUAL_ID;
			}
			if ((semanticHint == null || UseCaseEditPart.VISUAL_ID == nodeVisualID)
					&& UMLPackage.eINSTANCE.getUseCase().isSuperTypeOf(
							domainElementMetaclass)
					&& (domainElement == null || isNodeUseCase_1005((UseCase) domainElement))) {
				return UseCaseEditPart.VISUAL_ID;
			}
			return getUnrecognizedPackage_79ChildNodeID(domainElement,
					semanticHint);
		case AssociationEditPart.VISUAL_ID:
			if (AssociationNameEditPart.VISUAL_ID == nodeVisualID) {
				return AssociationNameEditPart.VISUAL_ID;
			}
			if (AssociationName2EditPart.VISUAL_ID == nodeVisualID) {
				return AssociationName2EditPart.VISUAL_ID;
			}
			return getUnrecognizedAssociation_3002LinkLabelID(semanticHint);
		case Association2EditPart.VISUAL_ID:
			if (AssociationName3EditPart.VISUAL_ID == nodeVisualID) {
				return AssociationName3EditPart.VISUAL_ID;
			}
			if (AssociationName4EditPart.VISUAL_ID == nodeVisualID) {
				return AssociationName4EditPart.VISUAL_ID;
			}
			return getUnrecognizedAssociation_3003LinkLabelID(semanticHint);
		case Association3EditPart.VISUAL_ID:
			if (AssociationName5EditPart.VISUAL_ID == nodeVisualID) {
				return AssociationName5EditPart.VISUAL_ID;
			}
			if (AssociationName6EditPart.VISUAL_ID == nodeVisualID) {
				return AssociationName6EditPart.VISUAL_ID;
			}
			return getUnrecognizedAssociation_3004LinkLabelID(semanticHint);
		case Association4EditPart.VISUAL_ID:
			if (AssociationName7EditPart.VISUAL_ID == nodeVisualID) {
				return AssociationName7EditPart.VISUAL_ID;
			}
			if (AssociationName8EditPart.VISUAL_ID == nodeVisualID) {
				return AssociationName8EditPart.VISUAL_ID;
			}
			return getUnrecognizedAssociation_3005LinkLabelID(semanticHint);
		case Association5EditPart.VISUAL_ID:
			if (AssociationName9EditPart.VISUAL_ID == nodeVisualID) {
				return AssociationName9EditPart.VISUAL_ID;
			}
			return getUnrecognizedAssociation_3006LinkLabelID(semanticHint);
		case DependencyEditPart.VISUAL_ID:
			if (DependencyNameEditPart.VISUAL_ID == nodeVisualID) {
				return DependencyNameEditPart.VISUAL_ID;
			}
			return getUnrecognizedDependency_3007LinkLabelID(semanticHint);
		}
		return -1;
	}

	/**
	 * @generated
	 */
	public static int getLinkWithClassVisualID(EObject domainElement) {
		if (domainElement == null) {
			return -1;
		}
		EClass domainElementMetaclass = domainElement.eClass();
		return getLinkWithClassVisualID(domainElement, domainElementMetaclass);
	}

	/**
	 * @generated
	 */
	public static int getLinkWithClassVisualID(EObject domainElement,
			EClass domainElementMetaclass) {
		if (UMLPackage.eINSTANCE.getGeneralization().isSuperTypeOf(
				domainElementMetaclass)
				&& (domainElement == null || isLinkWithClassGeneralization_3001((Generalization) domainElement))) {
			return GeneralizationEditPart.VISUAL_ID;
		} else if (UMLPackage.eINSTANCE.getAssociation().isSuperTypeOf(
				domainElementMetaclass)
				&& (domainElement == null || isLinkWithClassAssociation_3002((Association) domainElement))) {
			return AssociationEditPart.VISUAL_ID;
		} else if (UMLPackage.eINSTANCE.getAssociation().isSuperTypeOf(
				domainElementMetaclass)
				&& (domainElement == null || isLinkWithClassAssociation_3003((Association) domainElement))) {
			return Association2EditPart.VISUAL_ID;
		} else if (UMLPackage.eINSTANCE.getAssociation().isSuperTypeOf(
				domainElementMetaclass)
				&& (domainElement == null || isLinkWithClassAssociation_3004((Association) domainElement))) {
			return Association3EditPart.VISUAL_ID;
		} else if (UMLPackage.eINSTANCE.getAssociation().isSuperTypeOf(
				domainElementMetaclass)
				&& (domainElement == null || isLinkWithClassAssociation_3005((Association) domainElement))) {
			return Association4EditPart.VISUAL_ID;
		} else if (UMLPackage.eINSTANCE.getAssociation().isSuperTypeOf(
				domainElementMetaclass)
				&& (domainElement == null || isLinkWithClassAssociation_3006((Association) domainElement))) {
			return Association5EditPart.VISUAL_ID;
		} else if (UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(
				domainElementMetaclass)
				&& (domainElement == null || isLinkWithClassDependency_3007((Dependency) domainElement))) {
			return DependencyEditPart.VISUAL_ID;
		} else {
			return getUnrecognizedLinkWithClassID(domainElement);
		}
	}

	/**
	 * User can change implementation of this method to check some additional 
	 * conditions here.
	 *
	 * @generated
	 */
	private static boolean isDiagramPackage_79(
			org.eclipse.uml2.uml.Package element) {
		return true;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedDiagramID(EObject domainElement) {
		return -1;
	}

	/**
	 * User can change implementation of this method to check some additional 
	 * conditions here.
	 *
	 * @generated
	 */
	private static boolean isNodeClass_1001(org.eclipse.uml2.uml.Class element) {
		return true;
	}

	/**
	 * User can change implementation of this method to check some additional 
	 * conditions here.
	 *
	 * @generated
	 */
	private static boolean isNodeEnumeration_1002(Enumeration element) {
		return true;
	}

	/**
	 * User can change implementation of this method to check some additional 
	 * conditions here.
	 *
	 * @generated
	 */
	private static boolean isNodeInterface_1003(Interface element) {
		return true;
	}

	/**
	 * User can change implementation of this method to check some additional 
	 * conditions here.
	 *
	 * @generated
	 */
	private static boolean isNodeActor_1004(Actor element) {
		return true;
	}

	/**
	 * User can change implementation of this method to check some additional 
	 * conditions here.
	 *
	 * @generated
	 */
	private static boolean isNodeUseCase_1005(UseCase element) {
		return true;
	}

	/**
	 * User can change implementation of this method to check some additional 
	 * conditions here.
	 *
	 * @generated
	 */
	private static boolean isNodeProperty_2001(Property element) {
		return true;
	}

	/**
	 * User can change implementation of this method to check some additional 
	 * conditions here.
	 *
	 * @generated
	 */
	private static boolean isNodeEnumerationLiteral_2002(
			EnumerationLiteral element) {
		return true;
	}

	/**
	 * User can change implementation of this method to check some additional 
	 * conditions here.
	 *
	 * @generated
	 */
	private static boolean isNodeOperation_2003(Operation element) {
		return true;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedClass_1001ChildNodeID(
			EObject domainElement, String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedEnumeration_1002ChildNodeID(
			EObject domainElement, String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedInterface_1003ChildNodeID(
			EObject domainElement, String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedActor_1004ChildNodeID(
			EObject domainElement, String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedUseCase_1005ChildNodeID(
			EObject domainElement, String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedProperty_2001ChildNodeID(
			EObject domainElement, String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedEnumerationLiteral_2002ChildNodeID(
			EObject domainElement, String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedOperation_2003ChildNodeID(
			EObject domainElement, String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedClassProperties_5001ChildNodeID(
			EObject domainElement, String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedEnumerationLiterals_5002ChildNodeID(
			EObject domainElement, String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedInterfaceOperations_5003ChildNodeID(
			EObject domainElement, String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedPackage_79ChildNodeID(
			EObject domainElement, String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedAssociation_3002LinkLabelID(
			String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedAssociation_3003LinkLabelID(
			String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedAssociation_3004LinkLabelID(
			String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedAssociation_3005LinkLabelID(
			String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedAssociation_3006LinkLabelID(
			String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedDependency_3007LinkLabelID(
			String semanticHint) {
		return -1;
	}

	/**
	 * User can change implementation of this method to handle some specific
	 * situations not covered by default logic.
	 *
	 * @generated
	 */
	private static int getUnrecognizedLinkWithClassID(EObject domainElement) {
		return -1;
	}

	/**
	 * User can change implementation of this method to check some additional 
	 * conditions here.
	 *
	 * @generated
	 */
	private static boolean isLinkWithClassGeneralization_3001(
			Generalization element) {
		return true;
	}

	/**
	 * User can change implementation of this method to check some additional 
	 * conditions here.
	 *
	 * @generated NOT
	 */
	private static boolean isLinkWithClassAssociation_3002(Association element) {
		return ModelUtil.isOneToMany(element);
	}

	/**
	 * User can change implementation of this method to check some additional 
	 * conditions here.
	 *
	 * @generated NOT
	 */
	private static boolean isLinkWithClassAssociation_3003(Association element) {
		return ModelUtil.isManyToOne(element);
	}

	/**
	 * User can change implementation of this method to check some additional 
	 * conditions here.
	 *
	 * @generated NOT
	 */
	private static boolean isLinkWithClassAssociation_3004(Association element) {
		return ModelUtil.isManyToMany(element);
	}

	/**
	 * User can change implementation of this method to check some additional 
	 * conditions here.
	 *
	 * @generated NOT
	 */
	private static boolean isLinkWithClassAssociation_3005(Association element) {
		Type first = element.getMemberEnds().get(0).getType();
		Type second = element.getMemberEnds().get(1).getType();
		if (first instanceof Actor) return false;
		if (first instanceof UseCase) return false;
		if (second instanceof Actor) return false;
		if (second instanceof UseCase) return false;
		return ModelUtil.isOneToOne(element);
	}

	/**
	 * User can change implementation of this method to check some additional 
	 * conditions here.
	 *
	 * @generated
	 */
	private static boolean isLinkWithClassAssociation_3006(Association element) {
		return true;
	}

	/**
	 * User can change implementation of this method to check some additional 
	 * conditions here.
	 *
	 * @generated
	 */
	private static boolean isLinkWithClassDependency_3007(Dependency element) {
		return true;
	}
}
